
const editCheck = (id) => {
  dialogTitle.value = '编辑资料';
  dialogVisible.value = true;
  axios.get(`${BASE_URL}/v1/acceptance/select?id=${id}`)
    .then((response) => {
      if (response.data.code === 2000 && response.data.data) {
        // 确保所有字段都正确填充到表单中
        saveProjectForm.value = {
          id: response.data.data.id,
          projectId: response.data.data.projectId,
          materialName: response.data.data.materialName, // 修改为材料名称
          materialNumber: response.data.data.materialNumber,
          approachSpecification: response.data.data.approachSpecification,
          enterDate: response.data.data.enterDate,
          sampleStatus: response.data.data.sampleStatus,
          experimentImg: response.data.data.experimentImg,
          materialUnit: response.data.data.materialUnit,
        };
      } else {
        ElMessage.error('加载失败: 数据为空或格式错误');
      }
    })
    .catch((error) => {
      ElMessage.error('请求失败: ' + error.message);
    });
}
